package com.example.covid19.mapper;

import com.example.covid19.entity.SelectClass.roomcmp;
import com.example.covid19.entity.StationMessage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author BaiZhengChun
 * @since 2023-05-10
 */
public interface StationMessageMapper extends BaseMapper<StationMessage> {
    @Select("SELECT " +
            " COUNT(*) AS sum " +
            " FROM " +
            " station_message " +
            " WHERE " +
            " station_message.studentid = 0917420002 AND " +
            " station_message.state = 0 AND " +
            " station_message.auid is null ")
    Integer getcount(@Param("id")String id);
    @Select("SELECT " +
            " COUNT(*) AS sum " +
            " FROM " +
            " station_message " +
            " WHERE " +
            " station_message.auid = #{id} AND " +
            " station_message.state = 0 AND " +
            " station_message.auid IS NOT NULL ")
    Integer getglcount(@Param("id") String id);

}
